package com.ruoyi.project.shortUrl.log.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.project.shortUrl.log.domain.ShortUrlRequestLog;
import com.ruoyi.project.shortUrl.log.mapper.ShortUrlRequestLogMapper;
import com.ruoyi.project.shortUrl.log.service.IShortUrlRequestLogService;

/**
 * 短链接访问日志Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-03-29
 */
@Service
public class ShortUrlRequestLogServiceImpl implements IShortUrlRequestLogService 
{
    @Autowired
    private ShortUrlRequestLogMapper shortUrlRequestLogMapper;

    /**
     * 查询短链接访问日志
     * 
     * @param id 短链接访问日志ID
     * @return 短链接访问日志
     */
    @Override
    public ShortUrlRequestLog selectShortUrlRequestLogById(Long id)
    {
        return shortUrlRequestLogMapper.selectShortUrlRequestLogById(id);
    }

    /**
     * 查询短链接访问日志列表
     * 
     * @param shortUrlRequestLog 短链接访问日志
     * @return 短链接访问日志
     */
    @Override
    public List<ShortUrlRequestLog> selectShortUrlRequestLogList(ShortUrlRequestLog shortUrlRequestLog)
    {
        return shortUrlRequestLogMapper.selectShortUrlRequestLogList(shortUrlRequestLog);
    }

    /**
     * 新增短链接访问日志
     * 
     * @param shortUrlRequestLog 短链接访问日志
     * @return 结果
     */
    @Override
    public int insertShortUrlRequestLog(ShortUrlRequestLog shortUrlRequestLog)
    {
        return shortUrlRequestLogMapper.insertShortUrlRequestLog(shortUrlRequestLog);
    }

    /**
     * 修改短链接访问日志
     * 
     * @param shortUrlRequestLog 短链接访问日志
     * @return 结果
     */
    @Override
    public int updateShortUrlRequestLog(ShortUrlRequestLog shortUrlRequestLog)
    {
        return shortUrlRequestLogMapper.updateShortUrlRequestLog(shortUrlRequestLog);
    }

    /**
     * 删除短链接访问日志对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteShortUrlRequestLogByIds(String ids)
    {
        return shortUrlRequestLogMapper.deleteShortUrlRequestLogByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除短链接访问日志信息
     * 
     * @param id 短链接访问日志ID
     * @return 结果
     */
    @Override
    public int deleteShortUrlRequestLogById(Long id)
    {
        return shortUrlRequestLogMapper.deleteShortUrlRequestLogById(id);
    }
}
